package com.dropdb.demo.bean.bo;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class AdminListCommentsBO {
    @NotNull(message = "页数不能为空")
    @Min(value = 1, message = "页数不能小于1")
    private Integer page;

    @NotNull(message = "条数不能为空")
    @Min(value = 1, message = "条数不能小于1")
    private Integer limit;

    @NotBlank(message = "参数非法")
    private String sort;

    @NotBlank(message = "参数非法")
    private String order;

    @Pattern(regexp = "^$|^\\+?[1-9][0-9]*$", message = "参数值不对")
    private String userId;

    @Pattern(regexp = "^$|^\\+?[1-9][0-9]*$", message = "参数值不对")
    private String valueId;
}
